package com.petter.lock.mamoryBarrier;

/**
 * @author : GD
 * @date :2021/12/16 : 14:55
 */
public class VolatileClassTest {

    private volatile String a = "1";
    private String b = "2";


    private void test(){
        synchronized (this){
            b = a;
            synchronized (b){
                b = a;
            }
        }
    }
}
